import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../views/HomeView.vue'),
      children: [
        // 数据概览
        {
          path: '/dataOverview',
          name: 'overview',
          component: () => import('../views/dataOverview/index.vue'),
        },
        // 候选人管理
        {
          path: '/CandidateManagement',
          name: 'management',
          component: () => import('../views/CandidateManagement/index.vue'),
        },
        // 题库管理
        {
          path: '/examination/classify',
          name: 'classify',
          component: () => import('../views/examination/classify.vue'),
        },
        {
          path: '/examination/gather',
          name: 'gather',
          component: () => import('../views/examination/gather.vue'),
        },
        {
          path: '/examination/subject',
          name: 'subject',
          component: () => import('../views/examination/subject.vue'),
        },
        // 面试记录
        {
          path: '/interviewRecord',
          name: 'interviewRecord',
          component: () => import('../views/interviewRecord/index.vue'),
        },
        // 面试安排
        {
          path: '/interviewArrange',
          name: 'interviewArrange',
          component: () => import('../views/interviewArrange/index.vue'),
        },
        // 职位管理
        {
          path: '/positionManagement',
          name: 'positionManagement',
          component: () => import('../views/positionManagement/index.vue'),
        },
        // 面试官管理
        {
          path: '/interviewerManagement',
          name: 'interviewerManagement',
          component: () => import('../views/interviewerManagement/index.vue'),
        },
        // 系统设置
        {
          path: '/systemSetting',
          name: 'systemSetting',
          component: () => import('../views/systemSetting/index.vue'),
        },
      ],
    },
  ],
})

export default router
